home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 773 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: EU.net!sun4nl!xs4all!usenet
  2. From: martijnl@xs4all.nl (Martijn Lievaart)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: writting to serial port, _bios_serialcom() ?
  5. Date: 7 Jan 1996 00:44:37 GMT
  6. Organization: XS4ALL, networking for the masses
  7. Message-ID: <4cn51l$he7@news.xs4all.nl>
  8. References: <17705140F1S86.1RFD1642@MtSACvm.MtSAC.edu>
  9. NNTP-Posting-Host: mas01-09.dial.xs4all.nl
  10. Keywords: serial bios rs-232
  11. X-Newsreader: WinVN 0.99.6
  12.  
  13. In article <17705140F1S86.1RFD1642@MtSACvm.MtSAC.edu>, 
  14. 1RFD1642@MtSACvm.MtSAC.edu says...
  15. >
  16. >Hi all:
  17. >If this is the wrong place for this question, please point me to the right
  18. >one.
  19.  
  20. It is the wrong place, though I don't know what would be the right one.
  21.  
  22. >I have a microcontroller connected to my PC via COM1. I was trying to
  23. >send bytes to it from my c++ program with _bios_serialcom() but i get
  24. >bit 15 set ( Time out error ).   Connections are fine because if i use a
  25. >communications program in terminal mode the bytes arrive at the other end
  26. >with no problem.
  27.  
  28. _bios_serialcom() works through the bios. That means no interupt support, just 
  29. polling. This may or may not be the problem, but as a commprogram works (they 
  30. just write directly to the hardware) I would say it is.
  31.  
  32. If this is the problem, you should do the same, t.i. write to the hardware. 
  33. Luckily there are a lot of freeware libraries out there that will encapsulate 
  34. this for you.
  35.  
  36. If possible, try to drop the baudrate to 300bps. If that works, programming 
  37. the metal will solve the problem at higher baudrates.
  38.  
  39. >Anyone has any ideas why i get a Time out  error ?  I thought i needed to
  40. >connect other lines in the serial port, i only have Rx,Tx and GND connected
  41. >, so i connected RTS. But still nothing.
  42.  
  43. Getting a good handshaked cable may also solve the problem, uh find the right 
  44. newsgroup to ask the schematic.
  45.  
  46. >Is there another function to use ( easier ) ?
  47. >BTW when i send the settings to the port i get no errors... and this is
  48. >for BC++ 3.1 , for a DOS program. I used Watcom and i got the same results.
  49. >Please reply to :  1rfd1642@ibm.mtsac.edu
  50. >Thanks in advance!!
  51.  
  52. Serial support under DOS is about zilch. Entire books have been written about 
  53. solving that. You might want to get one (I still use the MSDOS encyclopedia).
  54.  
  55. Hope this helps,
  56. Martijn.
  57.  
  58.